package com.examplemartin.jpademo.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {

  public static String getBackupFileName(){
    Date date = new Date();
    String strDateFormat = "yyyy-MM-dd-HH-mm-ss";
    SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat);
    return "bak"+sdf.format(date)+".sql";
  }

  public static String getOrderName(){
    Date date = new Date();
    String strDateFormat = "yyyyMMdd";
    SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat);
    return sdf.format(date);
  }

}
